import java.awt.*;
import java.awt.event.InputEvent;

/**
 * 打开微信聊天框
 */
public class TestRobot1 {
    public static void main(String[] args) {
        try {
            Robot robot=new Robot();
            //确定鼠标位置,定位在微信
            robot.mouseMove(967,1571);
            //按住鼠标右键操作
            robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
            //释放鼠标右键操作
            robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
            int x=1334,y=835;
            for (int i = 0; i < 6; i++) {
                robot.mouseMove(x,y);
                y=y+60;
                robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
                robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
                robot.delay(5000);
                robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
                robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);


            }
        } catch (AWTException e) {
            throw new RuntimeException(e);
        }
    }
}
